package com.xuzimian.globaldemo.jmx.standard;

/**
 * 标准的MBean由一个MBean接口和一个Class类组成，并且接口必须命名为 xxxMBean 而 Class类名必须为 xxx 放与同一个包下，若不在同一包下运行时将出异常。
 *
 * @program: global-demo
 * @description:
 * @author: xzm
 * @create: 2019-01-24 15:24
 **/
public class Hello implements HelloMBean {
    private String name;

    private String age;

    @Override
    public void getTelephone() {
        System.out.println("get Telephone");
    }

    @Override
    public void helloWorld() {
        System.out.println("hello world");
    }

    @Override
    public void helloWorld(String str) {
        System.out.println("helloWorld:" + str);
    }

    @Override
    public String getName() {
        System.out.println("get name :" + name);
        return name;
    }

    @Override
    public void setName(String name) {
        System.out.println("set name " + name);
        this.name = name;
    }

    @Override
    public String getAge() {
        System.out.println("get age :"+age);
        return age;
    }

    @Override
    public void setAge(String age) {
        System.out.println("set age :"+age);
        this.age = age;
    }
}
